<!--
  * 线路管理
  *
-->
<template>
  <a-row :gutter="10" :style="{ height: appConfigStore.getLayoutContentClientRect.height + 'px' }">
    <a-col :span="4">
      <LineMenu ref="LineMenuRef" @select-category="handleSelectCategory" />
    </a-col>

    <a-col :span="20">
      <div class="employee-box">
        <StoreList ref="StoreListRef" class="employee" />
      </div>
    </a-col>
  </a-row>
</template>
<script setup lang="ts">
import LineMenu from './components/line-menu/index.vue'
import StoreList from './components/store-list/store-list.vue'
import { useAppConfigStore } from '@/store/modules/app-store'

const appConfigStore = useAppConfigStore()
const LineMenuRef = ref(null)
const StoreListRef = ref(null)

const handleSelectCategory = (id) => {
  if (StoreListRef.value) {
    StoreListRef.value.dataLine({ id })
    StoreListRef.value.queryData()
  }
}
</script>
<style scoped lang="less">
.employee-box {
  display: flex;
  flex-direction: column;

  .employee {
    flex-grow: 2;
  }
}
</style>
